A texture copy effect. More...
Public Member Functions | |
TextureCopyEffect () | |
~TextureCopyEffect () | |
virtual EFFECT_TYPE | getType () const override |
nkGraphics::Texture * | getSourceTexture () const |
nkGraphics::Sampler * | getSourceSampler () const |
void | setSourceTexture (nkGraphics::Texture *value) |
void | setSourceSampler (nkGraphics::Sampler *value) |
virtual bool | load () override |
virtual void | unload () override |
![]() | |
Effect () | |
virtual | ~Effect () |
nkMemory::StringView | getName () const |
nkGraphics::Shader * | getShader () const |
void | setName (nkMemory::StringView value) |
A texture copy effect.
This effect is plain simple and will just take a texture on input, that it will fit into the rendering target.
Uses for such an effect could be to render a texture into a smaller target, or copy a texture into another one for a later use.
To help, some tweaking can be done about the way the texture will be sampled by providing a custom sampler to the effect.
nkAstraeus::TextureCopyEffect::TextureCopyEffect | ( | ) |
Default constructor. See EffectManager::createOrRetrieve().
nkAstraeus::TextureCopyEffect::~TextureCopyEffect | ( | ) |
Destructor. See EffectManager::erase().
|
overridevirtual |
Implements nkAstraeus::Effect.
nkGraphics::Texture* nkAstraeus::TextureCopyEffect::getSourceTexture | ( | ) | const |
nkGraphics::Sampler* nkAstraeus::TextureCopyEffect::getSourceSampler | ( | ) | const |
void nkAstraeus::TextureCopyEffect::setSourceTexture | ( | nkGraphics::Texture * | value | ) |
Sets the texture to use as an input to the effect.
value | The texture to use. |
void nkAstraeus::TextureCopyEffect::setSourceSampler | ( | nkGraphics::Sampler * | value | ) |
Overloads the sampler used to sample and copy the texture into the target. By default, the sampler used clamps the coordinates for sampling and uses point sampling.
value | The sampler to use, nullptr to reset to the default one. |
|
overridevirtual |
See Effect::load().
Implements nkAstraeus::Effect.
|
overridevirtual |
See Effect::unload().
Implements nkAstraeus::Effect.